<!DOCTYPE html>
{% load substring %}
<html lang="en">
<head>
    <meta charset="utf-8"/>
    <title>{{ title }}</title>
    <meta name="keywords" content="Bootstrap模版,Bootstrap模版下载,Bootstrap教程,Bootstrap中文"/>
    <meta name="description" content="站长素材提供Bootstrap模版,Bootstrap教程,Bootstrap中文翻译等相关Bootstrap插件下载"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>

    <!-- basic styles -->

    <link href="/static/assets/css/bootstrap.min.css" rel="stylesheet"/>
    <link rel="stylesheet" href="/static/assets/css/font-awesome.min.css"/>

    <!-- ace styles -->

    <link rel="stylesheet" href="/static/assets/css/ace.min.css"/>
    <link rel="stylesheet" href="/static/assets/css/ace-rtl.min.css"/>
    <link rel="stylesheet" href="/static/assets/css/ace-skins.min.css"/>

    <!-- ace settings handler -->

    <script src="/static/assets/js/ace-extra.min.js"></script>
</head>

<body>
<div class="navbar navbar-default" id="navbar">
    <script type="text/javascript">
        try {
            ace.settings.check('navbar', 'fixed')
        } catch (e) {
        }
    </script>

    <div class="navbar-container" id="navbar-container">
        <div class="navbar-header pull-left">
            <a href="#" class="navbar-brand">
                <small>
                    <i class="icon-leaf"></i>
                    SHFramework Station
                </small>
            </a><!-- /.brand -->
        </div>
        <!-- /.navbar-header -->
    </div>
    <!-- /.container -->
</div>

<div class="main-container" id="main-container">
    <script type="text/javascript">
        try {
            ace.settings.check('main-container', 'fixed')
        } catch (e) {
        }
    </script>

    <div class="main-container-inner">
        <a class="menu-toggler" id="menu-toggler" href="#">
            <span class="menu-text"></span>
        </a>

        <div class="sidebar" id="sidebar">
            <script type="text/javascript">
                try {
                    ace.settings.check('sidebar', 'fixed')
                } catch (e) {
                }
            </script>

            <div class="sidebar-shortcuts" id="sidebar-shortcuts">
                <div class="sidebar-shortcuts-large" id="sidebar-shortcuts-large">
                    <button class="btn btn-success">
                        <i class="icon-signal"></i>
                    </button>

                    <button class="btn btn-info">
                        <i class="icon-pencil"></i>
                    </button>

                    <button class="btn btn-warning">
                        <i class="icon-group"></i>
                    </button>

                    <button class="btn btn-danger">
                        <i class="icon-cogs"></i>
                    </button>
                </div>

                <div class="sidebar-shortcuts-mini" id="sidebar-shortcuts-mini">
                    <span class="btn btn-success"></span>

                    <span class="btn btn-info"></span>

                    <span class="btn btn-warning"></span>

                    <span class="btn btn-danger"></span>
                </div>
            </div>
            <!-- #sidebar-shortcuts -->
            <ul class="nav nav-list">
                <li class="active">
                    <a href="http://10.0.69.79/django/admin/" target="_blank">
                        <i class="icon-dashboard"></i>
                        <span class="menu-text"> 控制台 </span>
                    </a>
                </li>

                <li class="active open">
                    <a href="#" class="dropdown-toggle">
                        <i class="icon-list"></i>
                        <span class="menu-text">开发包</span>
                        <span class="badge badge-primary">2</span>
                        <b class="arrow icon-angle-down"></b>
                    </a>

                    <ul class="submenu">
                        <li class="active">
                            <a href="http://10.0.69.79/django/home/download">
                                <i class="icon-double-angle-right"></i>
                                资源下载
                            </a>
                        </li>

                        <li>
                            <a href="http://10.0.119.144/h5/shfdoc/output/index.html" target="_blank">
                                <i class="icon-double-angle-right"></i>
                                接口文档
                            </a>
                        </li>
                    </ul>
                </li>

                <li>
                    <a href="http://10.16.4.100/_admin/login?came_from=%2F" target="_blank">
                        <i class="icon-list-alt"></i>
                        <span class="menu-text"> Git库 </span>
                    </a>
                </li>

                <li>
                    <a href="http://smc.sohuno.com/wiki/login.action" target="_blank">
                        <i class="icon-calendar"></i>
                            <span class="menu-text">
                                WIKI
                            </span>
                    </a>
                </li>

                <li>
                    <a href="http://jira.sohuno.com/login.jsp" target="_blank">
                        <i class="icon-picture"></i>
                        <span class="menu-text"> JIRA </span>
                    </a>
                </li>

            </ul>
            <!-- /.nav-list -->

            <div class="sidebar-collapse" id="sidebar-collapse">
                <i class="icon-double-angle-left" data-icon1="icon-double-angle-left" data-icon2="icon-double-angle-right"></i>
            </div>

            <script type="text/javascript">
                try {
                    ace.settings.check('sidebar', 'collapsed')
                } catch (e) {
                }
            </script>
        </div>

        <div class="main-content">
            <div class="breadcrumbs" id="breadcrumbs">
                <script type="text/javascript">
                    try {
                        ace.settings.check('breadcrumbs', 'fixed')
                    } catch (e) {
                    }
                </script>

                <ul class="breadcrumb">
                    <li>
                        <i class="icon-home home-icon"></i>
                        <a href="/django/home/download">首页</a>
                    </li>

                    <li>
                        <a href="/django/home/download">下载</a>
                    </li>
                    <li class="active">{{ title }}</li>
                </ul>
                <!-- .breadcrumb -->
            </div>
            <div class="page-content">
                <div class="page-header">
                    <h1>
                        <span class="green"><a href="#modal-table" role="button" class="green" data-toggle="modal">资源下载</a></span>
                        <small>
                            <i class="icon-double-angle-right"></i>
                            Develop Zips
                        </small>
                    </h1>
                </div>
                <!-- /.page-header -->

                <div class="row">
                    <div class="col-xs-12">
                        {% if filelist %}

                            {% if alert %}
                                <div class="alert alert-block alert-success">
                                    <button type="button" class="close" data-dismiss="alert">
                                        <i class="icon-remove"></i>
                                    </button>

                                    <i class="icon-ok green"></i>
                                    更新提示:
                                    <strong class="orange">
                                        {{ module_name | chgModName }}{{ module_type | typeName }}包&nbsp;
                                    </strong>
                                    最后修改时间为:<span class="red">{{ modify_time | date:"Y-m-d H:i:s" }}</span>
                                </div>
                            {% endif %}

                            <h4 class="pink">
                                <i class="icon-hand-right icon-animated-hand-pointer blue"></i>
                                <a href="/django/home/download/{{ module_name }}" role="button" class="blue" data-toggle="modal"
                                   data-placement="top" title="{{ module_name | chgModName }}">{{ module_name | chgModName }} </a>
                            </h4>
                            <div class="row">
                                <div class="col-xs-12">
                                    <div class="table-responsive">
                                        <table id="project-table" class="table table-striped table-bordered table-hover">
                                            <thead>
                                            <tr class="head">
                                                <th style="width: 80px;">类型</th>
                                                <th>版本</th>
                                                <th style="width:100px;">名称</th>
                                                <th style="width:140px">模块</th>
                                                <th>大小</th>
                                                 <th style="width:220px">修改时间</th>
                                                <th>MD5</th>
                                            </tr>
                                            </thead>
                                            <tbody>
                                            {% for info in filelist %}
                                                <tr>
                                                    <td>
                                                        {% if info.module_type == "dev" %}
                                                            <span class="label label-info">开发包</span>
                                                        {% elif info.module_type == "min" %}
                                                            <span class="label label-warning">压缩包</span>
                                                        {% else %}
                                                            <span class="label label-success">加密包</span>
                                                        {% endif %}
                                                    </td>
                                                    <td>
                                                        {{ info.project_version | dottedVer  }}
                                                    </td>
                                                    <td>
                                                        {{ info.module_name | capfirst }}
                                                    </td>
                                                    <td>
                                                        <a class="downloadLink" href="{{ info.project_url }}{{ info.zip }}" data-options="project:{{ info.module_name }},type:{{ info.module_type }},md5:{{ info.md5 }}">{{ info.zip }}</a>
                                                    </td>
                                                    <td>{{ info.size }}KB</td>
                                                    <td>
                                                        <div style="float: left;padding-right: 6px;">
                                                            {{ info.modify_time | date:"Y-m-d H:i:s" }}
                                                        </div>
                                                        {% if info.notify %}
                                                            {% if info.module_type == "dev" and info.md5 != devCookie %}
                                                                <div class="visible-md visible-lg hidden-sm hidden-xs btn-group">
                                                                    <a href="/django/home/download/{{ info.module_name }}/{{ info.id }}">
                                                                        <span class="label label-sm label-danger arrowed">
                                                                          有更新了
                                                                        </span>
                                                                    </a>
                                                                </div>
                                                            {% endif %}

                                                            {% if info.module_type == "min" and info.md5 != minCookie %}
                                                                <div class="visible-md visible-lg hidden-sm hidden-xs btn-group">
                                                                    <a href="/django/home/download/{{ info.module_name }}/{{ info.id }}">
                                                                        <span class="label label-sm label-danger arrowed">
                                                                          有更新了
                                                                        </span>
                                                                    </a>
                                                                </div>
                                                            {% endif %}
                                                        {% endif %}
                                                    </td>
                                                    <td>{{ info.md5 }}</td>
                                                </tr>
                                            {% endfor %}
                                            </tbody>
                                        </table>
                                    </div>
                                </div>
                            </div>
                        {% endif %}

                        {% if all_mode %}
                            {% for key,value in all_mode.items %}
                                <h4 class="pink">
                                    <i class="icon-hand-right icon-animated-hand-pointer blue"></i>
                                    <a href="/django/home/download/{{ key }}" data-placement="top"
                                       title="{{ key| chgModName }}"> {{ key| chgModName }} </a>
                                </h4>
                                <div class="row">
                                    <div class="col-xs-12">
                                        <div class="table-responsive">
                                            <table id="sample-table-1" class="table table-striped table-bordered table-hover">
                                                <thead>
                                                <tr>
                                                    <th style="width: 80px;">类型</th>
                                                    <th style="width: 55px;">版本</th>
                                                    <th style="width:130px;">名称</th>
                                                    <th style="width:150px">模块</th>
                                                    <th>大小</th>
                                                    <th style="width:220px">修改时间</th>
                                                    <th>MD5</th>
                                                </tr>
                                                </thead>

                                                <tbody>
                                                {% for info in value %}
                                                    <tr>
                                                        <td>
                                                            {% if info.module_type == "dev" %}
                                                                <span class="label label-info">开发包</span>
                                                            {% elif info.module_type == "min" %}
                                                                <span class="label label-warning">压缩包</span>
                                                            {% else %}
                                                                <span class="label label-success">加密包</span>
                                                            {% endif %}
                                                        </td>
                                                        <td>
                                                            {{ info.project_version | dottedVer }}
                                                        </td>
                                                        <td>
                                                            {{ info.module_name | capfirst }}
                                                        </td>
                                                        <td>
                                                            <a href="{{ info.project_url }}{{ info.zip }}">{{ info.zip }}</a>
                                                        </td>
                                                        <td>{{ info.size }}KB</td>
                                                        <td>
                                                            <div style="float: left;padding-right: 6px;">
                                                                {{ info.modify_time | date:"Y-m-d H:i:s" }}
                                                            </div>
                                                        </td>
                                                        <td>{{ info.md5 }}</td>
                                                    </tr>
                                                {% endfor %}
                                                </tbody>
                                            </table>
                                        </div>
                                        <!-- /.table-responsive -->
                                    </div>
                                    <!-- /span -->
                                </div>
                            {% endfor %}
                            <div class="hr hr-18 dotted hr-double"></div>

                            <div class="row">
                                <div class="col-xs-12">
                                    <h3 class="header smaller lighter blue">历史记录</h3>

                                    <div class="table-header">
                                        开发资源里程碑
                                    </div>

                                    <div class="table-responsive">
                                        <table id="sample-table-2" class="table table-striped table-bordered table-hover">
                                            <thead>
                                            <tr>
                                               <th style="width: 80px;">类型</th>
                                                <th style="width: 75px;">版本</th>
                                                <th style="width:130px;">名称</th>
                                                <th style="width:150px">模块</th>
                                                <th>大小</th>
                                                <th>修改时间</th>
                                                <th>MD5</th>
                                            </tr>
                                            </thead>

                                            <tbody>
                                            {% for info in mode_list %}
                                                <tr>
                                                    <td>
                                                        {% if info.module_type == "dev" %}
                                                            <span class="label label-info">开发包</span>
                                                        {% elif info.module_type == "min" %}
                                                            <span class="label label-warning">压缩包</span>
                                                        {% else %}
                                                            <span class="label label-success">加密包</span>
                                                        {% endif %}
                                                    </td>
                                                    <td>
                                                        {{ info.project_version | dottedVer }}
                                                    </td>
                                                    <td>
                                                        {{ info.module_name | capfirst }}
                                                    </td>
                                                    <td>
                                                        <a href="{{ info.project_url }}{{ info.zip }}">{{ info.zip }}</a>
                                                    </td>
                                                    <td>{{ info.size }}KB</td>
                                                    <td>
                                                        <div style="float: left;padding-right: 6px;">
                                                            {{ info.modify_time | date:"Y-m-d H:i:s" }}
                                                        </div>
                                                    </td>
                                                    <td>{{ info.md5 }}</td>
                                                </tr>
                                            {% endfor %}
                                            </tbody>
                                        </table>
                                    </div>
                                </div>
                            </div>
                        {% endif %}
                        <!-- /row -->

                        <div id="modal-table" class="modal fade" tabindex="-1">
                            <div class="modal-dialog">
                                <div class="modal-content">
                                    <div class="modal-header no-padding">
                                        <div class="table-header">
                                            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                                                <span class="white">&times;</span>
                                            </button>
                                            温馨提示
                                        </div>
                                    </div>

                                    <div class="modal-body no-padding">
                                        H5开发资源包下载
                                    </div>

                                    <div class="modal-footer no-margin-top">
                                        <button class="btn btn-sm btn-danger pull-left" data-dismiss="modal">
                                            <i class="icon-remove"></i>
                                            关闭
                                        </button>
                                    </div>
                                </div>
                            </div>


                            <!-- PAGE CONTENT ENDS -->
                        </div>
                        <!-- /.col -->
                    </div>
                    <!-- /.row -->
                </div>

                <!-- /.page-content -->
            </div>
            <!-- /.main-content -->

            <div class="ace-settings-container" id="ace-settings-container">
                <div class="btn btn-app btn-xs btn-warning ace-settings-btn" id="ace-settings-btn">
                    <i class="icon-cog bigger-150"></i>
                </div>

                <div class="ace-settings-box" id="ace-settings-box">
                    <div>
                        <div class="pull-left">
                            <select id="skin-colorpicker" class="hide">
                                <option data-skin="default" value="#438EB9">#438EB9</option>
                                <option data-skin="skin-1" value="#222A2D">#222A2D</option>
                                <option data-skin="skin-2" value="#C6487E">#C6487E</option>
                                <option data-skin="skin-3" value="#D0D0D0">#D0D0D0</option>
                            </select>
                        </div>
                        <span>&nbsp; Choose Skin</span>
                    </div>

                    <div>
                        <input type="checkbox" class="ace ace-checkbox-2" id="ace-settings-navbar"/>
                        <label class="lbl" for="ace-settings-navbar"> Fixed Navbar</label>
                    </div>

                    <div>
                        <input type="checkbox" class="ace ace-checkbox-2" id="ace-settings-sidebar"/>
                        <label class="lbl" for="ace-settings-sidebar"> Fixed Sidebar</label>
                    </div>

                    <div>
                        <input type="checkbox" class="ace ace-checkbox-2" id="ace-settings-breadcrumbs"/>
                        <label class="lbl" for="ace-settings-breadcrumbs"> Fixed Breadcrumbs</label>
                    </div>

                    <div>
                        <input type="checkbox" class="ace ace-checkbox-2" id="ace-settings-rtl"/>
                        <label class="lbl" for="ace-settings-rtl"> Right To Left (rtl)</label>
                    </div>

                    <div>
                        <input type="checkbox" class="ace ace-checkbox-2" id="ace-settings-add-container"/>
                        <label class="lbl" for="ace-settings-add-container">
                            Inside
                            <b>.container</b>
                        </label>
                    </div>
                </div>
            </div>
            <!-- /#ace-settings-container -->
        </div>
        <!-- /.main-container-inner -->

            <a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
                <i class="icon-double-angle-up icon-only bigger-110"></i>
            </a>
        </div>
    </div>
    <!-- /.main-container -->

    <!-- basic scripts -->

    <script src="/static/js/jquery.min.js"></script>
    <script src="/static/js/bootstrap.min.js"></script>
    <script src="/static/assets/js/typeahead-bs2.min.js"></script>

    <!-- page specific plugin scripts -->

    <script src="/static/assets/js/jquery.dataTables.min.js"></script>
    <script src="/static/assets/js/jquery.dataTables.bootstrap.js"></script>

    <!-- ace scripts -->

    <script src="/static/assets/js/ace-elements.min.js"></script>
    <script src="/static/assets/js/ace.min.js"></script>
    <script src="/static/assets/js/download.js"></script>

    <!-- inline scripts related to this page -->

    <script type="text/javascript">
        jQuery(function ($) {
            var oTable1 = $('#sample-table-2').dataTable({
                "aoColumns": [
                    null,
                    null,
                    {"bSortable": true},
                    null, null, null,
                    {"bSortable": false}
                ]
            });

            $('[data-toggle="tooltip"]').tooltip({placement: tooltip_placement});
            function tooltip_placement(context, source) {
                var $source = $(source);
                var $parent = $source.closest('table')
                var off1 = $parent.offset();
                var w1 = $parent.width();

                var off2 = $source.offset();
                var w2 = $source.width();

                if (parseInt(off2.left) < parseInt(off1.left) + parseInt(w1 / 2)) return 'right';
                return 'left';
            }
        })
    </script>
</body>
</html>